package ESP.Control.E;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import ESP.Dao.BaseDao;

import com.alibaba.fastjson.JSONArray;

public class e02 {
	@Resource
	public BaseDao baseDao;
	/**
	 * 返回信息
	 */
	private JSONArray rows;
	private Map<String, String> message = new HashMap<String, String>();
	/**
	 * 用户信息
	 */
	private String user_role_id;
	private String user_id;
	
	public String queryE02Head(){
		if (this.user_id == null) {
			baseDao.setReturnInfo(message, "N", "本次登录会话失效，请重新登录！");
			return "e02_msg";
		}
		List list;
		list = baseDao.queryE02Head(user_id);
		if (list.size() == 0 || list == null || list.isEmpty()) {
			baseDao.setReturnInfo(message, "N", "未能查询到数据!");
			return "e02_msg";
		}else {
			this.rows = baseDao.toJson(list);
			return "e02_rows";
		}
	}
	/**
	 * set get
	 * @return
	 */
	public BaseDao getBaseDao() {
		return baseDao;
	}
	public void setBaseDao(BaseDao baseDao) {
		this.baseDao = baseDao;
	}
	public JSONArray getRows() {
		return rows;
	}
	public void setRows(JSONArray rows) {
		this.rows = rows;
	}
	public Map<String, String> getMessage() {
		return message;
	}
	public void setMessage(Map<String, String> message) {
		this.message = message;
	}
	public String getUser_role_id() {
		return user_role_id;
	}
	public void setUser_role_id(String userRoleId) {
		user_role_id = userRoleId;
	}
	public String getUser_id() {
		return user_id;
	}
	public void setUser_id(String userId) {
		user_id = userId;
	}
}
